Slider Help

Slider Help

So, I have been trying to build a simple slider to act as a scrollbar for a group of images inside a div.

I got really close to getting it work a few times. Ive probably done 4 or 5 tutorials none of which seemed to work.
So, I have back tracked it to be based off the jQuery documentation stuff.
Still no dice.

I'm getting two errors in Chrome using the developer tools :
1st - on line 44 in my html file :  "Uncaught TypeError: Object #<an Object> has no method "slider"". which means that the browser cant find the slider - Im not sure why thats happening.

2nd - in the actual jQuery UI js file : "Uncaught ReferenceError: jQuery is not defined" - I have no idea why that is happening, I just downloaded it fresh off the jQuery UI page with everything selected (no theme though).

Maybe someone out there may catch what I am doing wrong.
I'm supposed to send the client a comp by later today.

Here is my code:

  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title>Sam Gezari \\ Los Angeles Based Photographer</title>
  6. <link rel="stylesheet" href="main.css" />
  7. <script type="text/javascript" src="jquery-ui-1.8.4.custom.min.js"></script>
  8. <script type="text/javascript" src="jquery-1.4.2.min.js"></script>

  9. <script type="text/javascript">
  10.     document.createElement('header');
  11.     document.createElement('nav');
  12.     document.createElement('article');
  13.     document.createElement('section');
  14. document.createElement('footer');
  15. document.createElement('canvas');
  16. </script>

  17. <script type="text/javascript">

  18. $(document).ready(function(){
  19. //--------------------SET CURRENT PAGE-----------------------\\
  20. //--------------------LOAD IMAGES FROM XML--------------------\\
  21. $.get('newimages.xml', function(d){
  22. $(d).find('image').each(function(){
  23. var $image = $(this);
  24. var imageUrl = $image.attr("url");
  25. var html = '<div class="imageContainer">';
  26. html += '<img  src="' + imageUrl + '" />';
  27. html += '</div>';
  28. $('#content').append($(html));
  29. });
  30. });
  31. //--------------------SLIDE INIT-------------------------\\
  32.     var container = $('#mask');
  33.     var items = $('#content');
  34.     var itemsWidth = items.innerWidth() - container.outerWidth();
  35.     
  36.     $('#slider').slider({
  37.         minValue: 0,
  38.         maxValue: itemsWidth,
  39.         handle: '#handle',
  40.         stop: function (event, ui) {
  41.             items.animate({'left' : ui.value * -1}, 1000);
  42.         },
  43.         slide: function (event, ui) {
  44.             items.css({'left' : ui.value * -1});
  45.         }
  46.     });
  47.     
  48. });

  49. </script>
  50. </head>

  51. <body>
  52. <nav>
  53. <h1><span class="light">sam</span> gezari</h1>
  54. <ul id="main">
  55.     <li class="currentPage">new &emsp;&emsp;</li>
  56.         <li><a href="#">past</a> &emsp;&emsp;</li>
  57.         <li><a href="#">book</a> &emsp;&emsp;</li>
  58.         <li><a href="#">video</a> &emsp;&emsp;</li>
  59.         <li><a href="#">cv</a> &emsp;&emsp;</li>
  60.     </ul>
  61. </nav>

  62. <div id="mask">
  63.     <div id="content">    
  64.     </div>
  65. </div>

  66. <div id="slider">
  67.     <div id="handle"></div>
  68. </div>


  69. </body>
  70. </html>

Thanks for any help!